import CloudBaseRunServer from "./server.js"
import routes from "./routes.js";
import dotenv from "dotenv";

// 创建云托管 Server 实例
const server = new CloudBaseRunServer();

// 注册接口路由
for (const route of routes) {
    server.setRoute(route.path, route.method, route.handler);
}

// 添加环境变量
dotenv.config({path:"./.env"})

// 监听端口
server.listen(3000);
